package auto.domain;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

@Entity
@Table(name="VEHICLE")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "TYPE_VEHICLE", discriminatorType = DiscriminatorType.STRING)
public abstract class Vehicle {
	private long vehicleId;
	private String brand;
	private String color;
	private String power;
	private String category;
	private String model;
	private float unitPrice;
	private String description;
	
	public Vehicle(String brand, String color, String power, String category,
			String model, float unitPrice, String description) {
		
		this.brand = brand;
		this.color = color;
		this.power = power;
		this.category = category;
		this.model = model;
		this.unitPrice = unitPrice;
		this.description = description;
	}

	public Vehicle() {
		
	}
	@Id
	@GeneratedValue
	@Column(name="VEHICLE_ID")
	public long getVehicleId() {
		return vehicleId;
	}

	public void setVehicleId(long vehicleId) {
		this.vehicleId = vehicleId;
	}
	@Column(name="BRAND")
	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}
	@Column(name="COLOR")
	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}
	@Column(name="POWER")
	public String getPower() {
		return power;
	}

	public void setPower(String power) {
		this.power = power;
	}
	@Column(name="CATEGORY")
	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}
	@Column(name="MODEL")
	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	@Column(name="UNIT_PRICE")
	public float getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(float unitPrice) {
		this.unitPrice = unitPrice;
	}
	@Column(name="DESCRIPTION")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	
}
